﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace WatiNCF.TestApp.Controllers
{
    [Url("http://localhost:55387/WatiNCF.TestWebApp", "Default.aspx")]
    public class DefaultPageController : HomePageController<IDefaultPageController>, IRequiresLogin
    {
        public ISubPageController SubPageController { get; set; }

        public DefaultPageController()
        {
            SubPageController = new SubPageController();
        }

        public ISubPageController GoToSubPage()
        {
            Browser.Link(ByPartialId("SubPageLink")).Click();
            return SubPageController;
        }

        bool IRequiresLogin.IsLoggedIn()
        {
            return true;
        }

        void IRequiresLogin.Login()
        {
            Debug.WriteLine("Logging in...");
        }

        void IRequiresLogin.Logout()
        {
            Debug.WriteLine("Logging in...");
        }
    }
}
